package com.shiro.distribution.redis;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.CachingSessionDAO;

import java.io.Serializable;

/**
 * 功能:
 * Version: 1.0
 * Author: DR.YangLong
 * Date: 2014/10/3
 * Time: 9:55
 * Email:410357434@163.com
 * Editor:
 */
public class RedisCacheSessionDAO extends CachingSessionDAO {

    @Override
    protected void doUpdate(Session session) {

    }

    @Override
    protected void doDelete(Session session) {

    }

    @Override
    protected Serializable doCreate(Session session) {
        Serializable sessionId = generateSessionId(session);
        assignSessionId(session, sessionId);
        return sessionId;
    }

    @Override
    protected Session doReadSession(Serializable sessionId) {
        return null;
    }
}
